#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<iomanip>
#include<string>
using namespace std;
#include<string>
#include <algorithm>
bool isPalindrome(string s) {
    string change;
    for (auto pos : s) {
        if (pos >= 'A' && pos <= 'Z') {
            change += (pos+32);
        }
        if (pos >= 'a' && pos <= 'z' || pos >= '0' && pos <= '9') {
            change += pos;
        }
    }
    s = change;
    reverse(change.begin(), change.end());
    return s == change;
}

int main() {
    string s("A man, a plan, a canal: Panama");
    
    if (isPalindrome(s))cout << "true";
    return 0;
}